# Contributor: Ado <ado@expedio.it>
# Maintainer: Ado <ado@expedio.it>
pkgname=zaproxy
pkgver=2.14.0
pkgrel=0
pkgdesc="OWASP Zed Attack Proxy web app scanner"
url="https://www.zaproxy.org/"
arch="all !x86 !armhf !armv7 !riscv64 !aarch64 !ppc64le"
license="Apache-2.0"
_java_v=11
depends="
	bash
 	openjdk$_java_v-jre
	font-liberation
	"
makedepends="
	tar
	gradle
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/zaproxy/zaproxy/archive/v$pkgver.tar.gz"
options="!check"

build() {
	/usr/bin/gradle :zap:distLinux
}

package() {
	install -d "$pkgdir/usr/share/$pkgname"
	install -d "$pkgdir/usr/bin/"
	tar -zxf "zap/build/distributions/ZAP_${pkgver}_Linux.tar.gz" -C "$pkgdir/usr/share/$pkgname" --strip-components=1
	ln -s "/usr/share/zaproxy/zap.sh" "$pkgdir/usr/bin/$pkgname"
}


sha512sums="
660bb3b8f4789a2ae76c040ae879136da294f189bb331abc5f1e249a7fe69b64433c8a3e66d56d4f4d41072b20963afaa5615d76df5ade4049ea9d592faf017b  zaproxy-2.14.0.tar.gz
"
